﻿using System;
using Newtonsoft.Json;

namespace ChinaTax.LeQi
{
    public class DownOrReturnInvoiceQuotaRequest : Request<DownOrReturnInvoiceQuotaResponse>
    {
        public DownOrReturnInvoiceQuotaRequest()
        {
            ServiceCode = "XZTHSXED";

            //业务流水号，由“使用单位 id”+“直连单位 id”+“32 位随机生成码”组成
            No = LeQiConfig.LeQiId + LeQiConfig.LeQiId + Guid.NewGuid().ToString("N");
        }

        [JsonProperty("nsrsbh")]
        public string TaxNo { get => LeQiConfig.TaxNo; }

        [JsonProperty("ptbh")]
        public string PlatformNo { get => LeQiConfig.LeQiId; }

        [JsonProperty("sqlx")]
        //0：下载 1：退回
        public string ApplyType { get; set; }

        [JsonProperty("sqed")]
        public decimal ApplyQuota { get; set; }

        [JsonProperty("ywlsh")]
        public string No { get; set; }
    }

    public class DownOrReturnInvoiceQuotaResponse : Response
    {
        [JsonProperty("syqjq")]
        public string BeginDate { get; set; }

        [JsonProperty("syqjz")]
        public string EndDate { get; set; }
    }

}
